import React from "react";
import { BrowserRouter as Router, Route, Link, Routes } from "react-router-dom";
// 导入首页和城市选择两个组件(页面)
// 导入要使用的组件
import Home from "./pages/Home/index";
import CityList from "./pages/CityList/index";

import { Button } from "antd-mobile";
function App() {
  return (
    <Router>
      <div>
        <Link to="/home">首页</Link>
        <Link to="/citylist">城市选择</Link>
      </div>
      <Routes>
        {/* <Switch className="App"> */}
        {/* 配置导航菜单 */}

        {/* 配置路由 */}

        <Route 
        path="/home" 
        exact={false} 
        element={<Home />} 
        />
        
        <Route 
        path="/citylist" 
        exact={false} 
        element={<CityList />} 
        />
        {/* </Switch> */}
      </Routes>
    </Router>
  );
}

export default App;
